package com.plian.system.mapper.lg;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.plian.system.dto.lg.LawDisputeDTO;
import com.plian.system.entity.lg.LawDispute;
import com.plian.system.vo.lg.*;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * <p>
 * 法律纠纷 Mapper 接口
 * </p>
 *
 * @author hu song
 * @since 2023-01-30
 */
public interface LawDisputeMapper extends BaseMapper<LawDispute> {

    /**
     * 法律纠纷报汇总表
     *
     * @return
     */
    List<LawDisputeSummaryVO> lawDisputeSummary(LawDisputeDTO lawDisputeDTO);

    /**
     * 查询所有
     * @param lawDisputeDTO
     * @return
     */
    List<LawDispute> findAll(LawDisputeDTO lawDisputeDTO);

    /**
     * 案件统计
     *
     * @return
     */
    TotalCasesVO totalCases(@Param("year") String year, @Param("unitIds") List<String> unitIds);

    /**
     * 统计分类占比
     */
    List<ProportionOfCasesVO> countCaseType(@Param("year") String year, @Param("unitIds") List<String> unitIds);

    /**
     * 单位排名
     *
     * @param year
     * @param unitIds
     * @return
     */
    List<RankingOfUnitVO> rankingOfUnit(@Param("year") String year, @Param("unitIds") List<String> unitIds);

    /**
     * 案件趋势
     *
     * @param happenYears
     * @param unitIds
     * @return
     */
    List<CaseTrendsVO> caseTrends(@Param("happenYears") List<String> happenYears, @Param("unitIds") List<String> unitIds);
}
